Add file exists check in the upload
v3.1.0