Added error logs