Remove hard-coded paths

Create the logs folder based on the configurable variable specified in the script, remove any hard-coded locations.
Also removed the hard-coded paths in function postState()