fixed directive to use toastr.js when file is invalid