code added to secure files from unauthorised access