Replaced File.open ... do with File.read/write.