Added arg check to main.cpp