abstract listdir and readfile vtrace to prep for 'wiretrace'