Added better debug support