Previous file was not saved when uploaded