checking the validity of a resource file using isValid for the exists & isfile methods