Add logging and new exception type.