Ruby file write