changed File.open to File.new