Fix out and saving data to file
Fix out and save data to file