public static void createFile(BufferCache bufferCache, FileReference fileRef) throws HyracksDataException { IoUtil.create(fileRef); if (fileRef.isCompressed()) { final CompressedFileReference cFileRef = (CompressedFileReference) fileRef; try { bufferCache.createFile(cFileRef.getLAFFileReference()); } catch (HyracksDataException e) { //In case of creating the LAF file failed, delete fileRef IoUtil.delete(fileRef); throw e; } } }