replace hardcoded string message with a sysmsg
add error handling and thread locking
update handlers to use sysmsgs