write-result-file fixed