Change main.cpp return value, to do not execute app tow time. Resolve closing problem.