main.cpp: filter arguments before checking