Write results in file