Added debug print function