Adding log for detecting errors.