file write function
remove unnecessary comment