add log error messages to know which case occurred