I realised that but the problem is that the behaviour is tight coupled between the two functionalities. So considering that it's not big I think it's better to keep it together for maintenance purpose since if I have to change the validation most likely I would also have to change the logic to determine the domain folder.