Added code for debug support