Fix putting tiles into directory , added debug window