saving avg and st dev to file