Fixed upload bug & better errno