file: support writing to files