simplelock class and threadproc class and log class
modify log class to safe function call