Emit ‘error’ events on error
Add happy path specs for search() and replace()
Fix specs. error event -> file-error
Add specs for search() and replace() error case