cleanup error handling, use own Exception