checking js file for errors