Added debug messages and bounty calculation