Adding functions for debug reporting