Update writefile.rb