Check shape when reading file