added upload in separated thread