Storing data in a file