fixed viewFile() for large images