Improved autoloader error handling