Setup takes in pwd files. script bug fixes