log analaysis and plotting scripts