outputHelpIfNecessary should be part of Commander, not a standalone function since it depends on Commander object