pub fn write_close_command_on_msg_buffer(ctx: &mut CommandContext)