Minor change type of fileAlreadyOpened to int so it can tell us the tab index the file is located at.... Switch to already opened tab if only one file is opened.