Added iState logger to make debugging easier