[Refactor] Added log related functions and extened class