Return err as last return value