created boolean method for checking if requested file is valid