check whether the input files exist.