fix the precedence writing to file since the property with bigger scope
precede the property which have its scope contained in the bigger scope