Error handling und diagnosis