public int write(int index, char c, int count) throws Exception {
		int counter = 0;
		while(counter < count) {
			
			//End of file reached
			if(oft.getCurrentPosition(index) >= IOSystem.SIZE_OF_BLOCK_IN_BYTES * 3) { //If the pointer is the size of 3 blocks, we're done.
				break;
			}
		
			if(oft.shouldReadNextBlock(index)) { //We've reached the beginning of the next block
				//writer.write("Moving to the next block");
				oft.readNextBlockToBuffer(index);
			}	
			
			oft.writeChar(index, c);
			int newPosition = oft.getCurrentPosition(index) + 1;
			oft.setCurrentPosition(index, newPosition); //increment current position
			if(newPosition > oft.getLength(index))
				oft.setLength(index, newPosition);
			counter++;	
		}
		writer.write(counter + " bytes written");
		writer.newLine();
		return counter;
	}