Added logging and settings loader