cleanup, nicer debug output, less warnings, start of chunked uploader