added error handling to string upload