Added error log to sending