made more debug output optional