On exception write to error log instead of var_dump
Overwrite file from master branch