Removed unnecessary -m32 flag
Made sure MJPEG socket descriptor is being closed after failures