Only call quit for non-interactive use