adding __dirname
added Set Header to read external js files