m/file: Added / completed file_write method