added TextFileDevice
windows: compilation fix attempt