better logging
fix variable propagation