added toString
added additional logging