Have you tested with a bad format? I am wondering what happens after we return -1