made second modification to javascript for error printing