Add logging ; Use stopChan instead of boolean to leave the loop