File Directory Ruby

f = File.new("logfile.txt", "a")
f.puts Time.now
f.close