Added a check on the files