Enhance error recovery mechanism