finish log class

fix path not exist bug; add record and save methods