Refine backspace handling code
Remove extra new line output while processing command line