public static void shutDown() {
		Block superBlock = null;
		try {
			superBlock = new Block(Disk.homeDir.toString() + "/TransDisk/" + String.format("%05d", Disk.superBlockAddress) + ".txt","r");
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		
		if(dirtyBuffer[1] == 1) {				//write dirty block buffer to disk
			int noOfBlocksBitmap = 4; 					// hard code: 2000sized bitmap will require 4 blocks of 500
			try {
				superBlock.readLine();
				int[] freeBlockBitmapNo = new int[noOfBlocksBitmap];
				String tempStr = superBlock.readLine();
				for(int i = 0; i < noOfBlocksBitmap; i++)
					freeBlockBitmapNo[i] = Integer.parseInt(tempStr.substring(i, i+1));
				
				byte[] bitmapPieces;
				for(int i = 0, off = 0; i < 4; i++, off += 500) {
					Block bitmapBlock = new Block(Disk.homeDir.toString() + "/TransDisk/" + String.format("%05d", freeBlockBitmapNo[i]) + ".txt","rw");
					bitmapPieces = FreeSpaceMgnt.prepBuffer(Arrays.copyOfRange(freeBlockBitmap, off, off + 500));
					bitmapBlock.write(bitmapPieces);			//..test this!!!
					bitmapBlock.close();
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		if(dirtyBuffer[0] == 1) {				//write dirty inode buffer to disk
			try {
				superBlock.seek(0);
				superBlock.readLine();
				superBlock.readLine();
				int freeInodeBitmapNo = Integer.parseInt(superBlock.readLine());
				Block freeInodeBitmapBlk = new Block(Disk.homeDir.toString() + "/TransDisk/" + String.format("%05d", freeInodeBitmapNo) + ".txt","rw");
				freeInodeBitmapBlk.write(prepBuffer(freeInodeBitmap));
				freeInodeBitmapBlk.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}