add error prevention for the other js files