refactored logs out of magic