bugfix: existing files would be overwritten due to flag 'overwrite=true'