corrected persistence of raw data. added logging file