Write to file working.