Changes for logging and fixing some issues sending notifications