Added two global variable to record module in building or processing