Fixed bug with file path detection, in order to succesfuly load file

update require.resolve(filename) to
path.join(path.dirname(require.main.filename), filename )

in order to guarantee location of file to load based on the file that required