Added diagnostic tool