Fix `commitFiles` error handling
See
discussion