Added support for external data file for piecewiselinfunction.