oscgen: added command line argument validation