Avoid Error when input file is empty