Updated upload class
Moved more error reporting stuff into the debug block
Updated upload class
Moved more error reporting stuff into the debug block