Eliminate write method calls in doc action.