validate js file