Changed the new_file function so that a new window is made if a file is open.