Added protection against direct file access