split out file-io