Set errno to ENOENT, not EINVAL. This is consistent