improve error handling for arguments

Signed-off-by: René Moser <mail@renemoser.net>

Signed-off-by: Rene Moser <rene.moser@swisstxt.ch>