Fix gui-code to use new parameters for tryOpenFile