Add some input file validation