improve file buffer boundary checking; more verbose logging of errors
Merge remote-tracking branch 'origin/master' into small_disk