log details on error