Fix relative mid to the  module and use  check for isDebug