edited debug logging and added a security file that was missing