sgw: properly open and stat the egress file