Tile reading helper function