Closing port after upload