implemented input/output file checks