Reintroduced check to avoid open fd and raw port at the same time