Add support for reading files with more than 2 dimensions.