basic error handling.