pub fn find_max_msgnum(config: &Config) -> i32
Scans the output directory and returns the highest sequential message number found.