Debug flag controlled in __main__