Added guard check to avoid unused variables in Release build mode