validate js file adding