Added error log for failures