added console log check for js