adds some log messages and a better local check

need to find why the message is not sending tho