moved send message to finally block