rename overwriteMode to replaceMode