fix condition when attempting to validate file outside of a project