how can i save console data which is shown in console application?