Added utilities and debug logs