add beginning and end log