Refactor applied for save and open commands