commented and added setNew function call inside gui to make it open a new file first