added check if port is already used