Check the input file pointer before use it.