You need to change "msg" to "%msg%" to tell EJS use variable name "msg" instead of string value "msg".
It might be due to EJS version. This one was created very long time ago!