FIX - write of file