Add danger check to gateway construction code