add error catching on port