Moved log calls into main
Removed redundant settings
Fixed issues with moving of logging methods
Tidied up format of email sent out