Now nim binding can write to file too