added function to confirm overwriting existing files