Added toastr styling and improved error logging