check for presence of input file first