fix dispatchEvent signature
add log() method
call Response::prepare when handling exceptions