Added logger, setup some logging functions