Fixed logging in main.cpp