just use File::Copy#copy for copying files
add an option output_layer to specify output encoding