Add in debug logic