Added code to save and output imputed data