added checking root path on startup
added file saving to root dir