added comments and logLevel change