Fix if clause for overwrite option