Added check for input file