ArcBasic adds SystemProperty("savedir"): the folder where the program's own files go, ending in a slash. When you run the program from the editor it is the program's current folder. In a game made with Create Executable it is the player's data folder for the game (~/Library/Application Support/ArcBasic Games/<game> on a Mac, %APPDATA%\ArcBasic Games\<game> on Windows), where WriteFile puts its files.