devide lib and use lib/log