Support for 'ask before overwrite' flag in the Python backend