error logging
fix duplicate logging