changing logic for add files