onBeforeSaveEntry is hanging on import
Your script probably chokes because you're interacting with an undeclared variable $params – i.e. change

if($params['isNewEntry']) {


to

if($event-&gt;params['isNewEntry']) {