Add error manager on main.cpp