Rudimentry error handling.