Arduino Yun Sketch I try to upload over WiFi is not the sketch that runs

Hello,

I am trying to upload a sketch to my arduino yun via WiFi. I am able to see the arduino in the port options, and select it. However, when I upload my code I get the following output in the serial monitor no matter what code I use:

Unable to connect: retrying (0)... 
Unable to connect: retrying (2)... 
Unable to connect: retrying (3)... 
Unable to connect: retrying (3)... 
Unable to connect: retrying (4)... 
Connected!
Connected!

I also receive the following messages in the error output

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9587
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xD8"
avrdude: writing hfuse (1 bytes):
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD8:
avrdude: load data hfuse data from input file 0xD8:
avrdude: input file 0xD8 contains 1 bytes
avrdude: reading on-chip hfuse data:
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFB"
avrdude: writing efuse (1 bytes):
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFB:
avrdude: load data efuse data from input file 0xFB:
avrdude: input file 0xFB contains 1 bytes
avrdude: reading on-chip efuse data:
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "/tmp/sketch.hex"
avrdude: writing flash (32748 bytes):
avrdude: 32748 bytes of flash written
avrdude: verifying flash memory against /tmp/sketch.hex:
avrdude: load data flash data from input file /tmp/sketch.hex:
avrdude: input file /tmp/sketch.hex contains 32748 bytes
avrdude: reading on-chip flash data:
avrdude: verifying ...
avrdude: 32748 bytes of flash verified

avrdude done.  Thank you.

I am able to upload and run the code successfully using the cable. I am also able to log into putty. I am sure that my arduino yun is successfully connecting to the internet because I am able to post things to my google spreadsheet using -curl from the console, as well as from the code when it uploads.

The main reason I am concerned about this (aside from making sure the yun works correctly) is I want to upload the YunDiskSpaceExpander sketch, and it said to disconnect all external storage devices, so I figured it was better to do it over wifi and not risk it messing with my computer.

Kind of new to the world of arduino and IoT so any help at all would be appreciated.

To anyone dealing with a similar issue, use Console.begin and Console.print instead of Serial.begin and Serial.print