Added error log to ctrl