Add feature to save console history to file.