wrote in and out file operations