Improve error handling and enable cache by default.