added general error handling

addresses #93