Implemented name selection logic, resume from file