feat(bklog):Copy bkgpslog functions, rewrite main