private void lockProgrammProcess(Shell shell) {
		System.out.println("Try to get program lock");

		initDataDir();
		File locker = new File(VCNConstants.LOCK_FILE_PATH);
		
		locker.delete();
		
		boolean isAlreadyLocked = locker.isFile();
		
        if (isAlreadyLocked) {
    		MessageOKDialog md = new MessageOKDialog(shell, 
    				"VCN: Program already running",
    				"Program locked by other instance.\r\n" +
    				"Just one program instance can be executed from a same directory.");
    		md.open(); 
    		
        	System.out.println("Program locked by other instance");
        	System.exit(0);
        }
        
        try {
			locker.createNewFile();
			
			programLocker = new FileOutputStream(locker);			
		} catch (Exception ex) {
			UI.messageDialog(shell, "VCN: Error loading program", 
					"Can't create required files. \r\n" +
    				"Failed to work with the file system.\r\n" +
    				"Can't get program lock.");
    		
			System.out.println("Can not get program lock");
			ex.printStackTrace();
			System.exit(0);
		}
        
        System.out.println("Got program lock");
	}