translated and wrote to file