fix overwrite flag
changed mkdirs