Re-added logging capabilities