change error processing and update test file