Added code to prevent direct access to files