Fixes the states where no file exists or something was deleted/uploaded