debug and add logger utility