Trying to use function from one plugin inside another plugin

Hello!

I'm having an issue that I haven't been able to resolve. I have two plugins, Nivek_Core and Nivek_Relationship. Inside of Nivek Core, I have defined some file functions to be used by any of the other plugins I may develop. Here is an example:

Nivek Core Code -
Code:
Nivek.Core.NivekFS.fileExists = function (path) {
  console.log ('Checking if ' + path + ' exists');
  if (this.fs.existsSync (path)) {
  	if (Nivek.testing) {
  	  console.log (path + ' exists');
  	}
    return true;
  }
  else {
  	if (Nivek.testing) {
  	  console.log (path + ' doesnt exist');
  	}
    return false;
  }
}

I am trying to call this procedure here:

Nivek_Relationship
Code:
if (Nivek.Core.NivekFS.fileExists ('./relationship.json')) {
    JSONString = Nivek.Core.NivekFS.readFile ('./', 'relationship.json');
}

When this runs, I am not seeing the output from
Code:
console.log ('Checking if ' + path + ' exists')
.

I am also not receiving any error messages in debug. Am I missing a step to allow the functions in the first plugin to be accepted in the second? (For plugin order, Nivek Core is before Nivek Relationship).

Thanks!
From what it looks like, the code inside Nivek_Relationship you mentioned,
Code:
if (Nivek.Core.NivekFS.fileExists ('./relationship.json')) {
    JSONString = Nivek.Core.NivekFS.readFile ('./', 'relationship.json');
}
does not trigger. So it looks like a problem somewhere inside one of the functions that calls it.
So i turned on a break point and found out that everything works, the only issue is that the console messages aren't being sent. Would anything prevent writing to the console from another plugin?
There are two options that come to my mind right now.
1.
console.log = function () {return;}
2. You have downloaded custom nwjs, but non-SDK version.
Does any console.log work? Technically someone could overwrite console.log to make it a blank function.

Code:
console.log = function() {}

I really hope somebody didn't do that. To find out just create an event with a script command of console.log('Hello World') and see if it logs or not.
Yes, console in the calling plugin works fine, its the console command from the other plugin that I am calling to (That has the fileExists function). Very perplexing. But at least the routine seems to be working, minus the console portion hehe.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-use-function-from-one-plugin-inside-another-plugin.111132/