Add `path` field to Message case classes
Replace manual checks with `require`