removed quit() from overwrite check, previous problem was due to GUI application