Rudimentary error handling.