add write,flush function for CLog