check if file can be included before loading it