Is filing a mandamus petition necessary to preserve error for appeal