Add check for zero-length input file