Added more debug messages in main.py