Reading in csv files and filter relationships based on csv and write away these changes