s3:vfs_preopen: Change to a do-while loop and fix the check