added error checking features, and passed port into server activity