diff --git a/lib/rbpkg.rb b/lib/rbpkg.rb
index 2988cd0..f17da88 100644
--- a/lib/rbpkg.rb
+++ b/lib/rbpkg.rb
@@ -126,9 +126,12 @@ EOF
file = "#{name}.log"
if ! File.exist?(file) || File.mtime(file) <= File.mtime(subdir_file)
FileUtils.cp(subdir_file, file)
+ FileUtils.touch(file, mtime: File.mtime(subdir_file))
subdir_file_html = "#{subdir_file}.html"
if File.exist?(subdir_file_html)
- FileUtils.cp(subdir_file_html, "#{file}.html")
+ file_html = "#{file}.html"
+ FileUtils.cp(subdir_file_html, file_html)
+ FileUtils.touch(file_html, mtime: File.mtime(subdir_file_html))
html = "#{d}/#{subdir_file_html}"
else
html = nil