re-refactor to single directory state and updated more segregated logging of debug information