private boolean compareLSNToPageLSN(int lsn, int pageId) {

		BufferedReader reader = null;

		String[] line;
		try
		{
			reader = new BufferedReader(new FileReader("page" + pageId));
			line = reader.readLine().split("\\|");
		} catch (FileNotFoundException e)
		{
			System.err.println("File >>page" + pageId + ">> does not exist and will be created..");
			return false;
		} catch (Exception e)
		{
			System.err.println("File >>page" + pageId + ">> is corrupted!");
			return false;
		} finally
		{
			try
			{
				if (reader != null)
				{
					reader.close();
				}
			} catch (IOException e)
			{
				e.printStackTrace();
			}
		}

		return (Integer.parseInt(line[0].split("\\:")[1]) < lsn);
	}