handle js files properly