improved processing error handling