Should hopefully take care of duplicate issues and lost of scope during uploading of files