Translated sentences not getting written to file