Fixed NPE when deleting file without thumbnail