Optimized debug messages in Main() function.