Error handling when port is in use