Added state logging for issue 1159