implementing write to file