fixed regex check forn non-js files