def _copy_file_obj(source, destination, callback, length=16 * 1024):
    """Modified version of shutil.copyfileobj with callback"""
    while True:
        buf = source.read(length)
        if not buf:
            break
        destination.write(buf)
        callback(len(buf))
