improved error messages (fixes #10)