r3135: split the "create new" logic out from the "open existing" logic in