Tweaked the file checking script