Fix a write swap file bug where a portion of the bytes would not be recorded.