adding some debug statements, plus setting maxflank to correct default (100)