better log message on empty/nonempty document