added exception printing to the processArguments function