Add support for document --file behavior