Check if the input file exist

Previously I checked only if the folder in which the input file should
be exists