add javascript error logging support