Consolidate repo/ref modification
BUGFIX: check log levels appropriately