write to file fixed