Implemented fast screen clear in debug print and fixed cursor repositioning