Changed working of fs.exists + minor extra's

- changed working of fs.exists
- added cacheDir for faster changing cache dir.
- added port