log error for easier debugging