replace usign symfony filesystem by native functions