Writing a float value to a file