validation for input and output files