enable gateway and trace for debugging