Created write to file script