beforeRun and afterRun methods were renamed to beforeWrite and afterWrite.