Change openwrite to create for overriding files.