complete the fist version of recoding the interaction in log file