Hi would probably use a conditional: (condition) ? A : B instead of storing readGenerate and readWrite.