Fix error message not showing

The error message wasn't showing if an upload failed as it was trying to print a variable which didn't exist