Added several print debug statements in main to track program initialisation flow