added more error logs