toFile works properly.