Change to how fileExists works on Typescript / Javascript version. Does not bother adding file to necessaryFilesForRemoteIO is enableHeadlessMetis is true.