now it should write to file