add proper fs saving, fix path issues.