improve error handling for arguments

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