updated better logging