Improved output messaging by introducing two levels of debug information (might consider using a log library in the future, if needed).