Added returnType parameter to allow reading ArrayBuffers back from filesystem