Improved display of error messages while reading configuration files.

Changed voxelFilter function to be an external function and fixed it
so that it returns a filtered point cloud.