improve error handling for arguments

Signed-off-by: René Moser <mail@renemoser.net>
Merge pull request #4 from resmo/fix/improve-error-handling

improve error handling for arguments