add some more log statements for debugging