Add err_msg to tests