Update main.cpp

now it returns 1 on exit