Simplify generateOneFileDocument method removing rethrowing exceptions