fix exclude list writing