Have cow_domain_readsize function return errors on failure
Make main check error codes after trying to infer domain size from file