Handle errors gracefully (fixes #12)