write out resluts to disk