Corrected main.cpp. Before, as long as a comman existed, the logical operators assumed it was successfull. Now it is acutally based on whether the program executed correctly.