Fixed bug in flushing buffer on certain boundaries
Capture err from switching disks
Fixed bug in flushing buffer on certain boundaries