Make log directory and add filename to the end of the file,add COMPLETED watching function