Added a debug flag
Internal debug test