More refactoring, added sample log saving and plotting

Refs #10083