now can write to file