Updated JS logic for active menu so that it uses file and not file path