added code to allow for user commanded debugging