- enhanced error handling