Add a safety check to fileContext