             // Make sure its not null (it may have been deleted since last save)
             if (terrainsEdited[i] !is null)
             {
-                String fileLocation = fileSystem.programDir + "Data/" + terrainsEdited[i].GetAttribute("Height Map").GetResourceRef().name;
+                String fileLocation = sceneResourcePath + terrainsEdited[i].GetAttribute("Height Map").GetResourceRef().name;
 
                 Array<String> chunks = fileLocation.Split('/');
                 Array<String> parts = chunks[chunks.length - 1].Split('.');

    {
        ListView@ terrainBrushes = window.GetChild("BrushesContainer", true);

        String brushesFileLocation = fileSystem.programDir + "Data/Textures/Editor/TerrainBrushes";
        Array<String> files = fileSystem.ScanDir(brushesFileLocation, "*.*", SCAN_FILES, false);

        for (uint i = 0; i < files.length; ++i)

    private void CreateTerrain()
    {
        String fileName = "Textures/heightmap-" + time.timeSinceEpoch  + ".png";
        String fileLocation = sceneResourcePath + fileName;

        Node@ node = CreateNode(LOCAL);
        node.position = Vector3(0, 0, 0);
