use File#write instead of File::write that isn't supported by ruby-1.9.2