Add logging capabilities; backup after changing mask.