added the simple error processing