add more logs and fix