Added exception handlers and logs for these exceptions.