modify the error in data writing