Document: rename + add isEmptyBuffer()
use empty document when loading a file, if possible