I can't update an object property inside the callback of readFile() in Node.js

I have the next object in Node.js:

function myObject(){
    this.allowed = false;
    this.rawData;
}

myObject.prototype.checkAccess = function(){

    var self = this;

    if (!this.allowed){
        fs.readFile("./file.key", function(err, data){
            if (err) return;
            self.rawData = data;
            self.allowed = true;
        })
        return;
    }

    // several operations with rawData
    // not intended to be called when file.key is read
    // but next time checkAccess is called, by example
    console.log(this.rawData);

    // or, by example, use its content to decrypt 
    // another file or data from a socket...
    var isCorrectlyDecrypted = this.decrypt(this.rawData);
    if (!isCorrectlyDecrypted) this.allowed = false;
}

I periodically call checkAccess with setInterval but what I found is that, existing file.key, I never have the rawData property updated, being always undefined, while allowed property updates sucessfully.

Can someone, please, explain what's happening and tell me what I'm doing wrong and what's the best way of doing it?

EDITED:

So, as I said, in the code that uses this class I have:

var myObjectInstance = new myObject();

setInterval(function(){

    // here some previous code

    myObjectInstance.checkAccess();

   // and here more code
}, 25)

What checkAccess() does is to look periodically for a file.key to read if present, and then wait until the next call to work with its content. SO, console.log() is not intended to be used right after file.key is readed, BUT the next times checkAccess() is called and subsecuently. That's why console.log() is not placed inside the callback.

That's asynchronous programming. console.log(this.rawData) is called before the fs.readFile process is through (as it's a callback-function), giving you no output. Put the console.log() inside the fs.readFile-block and you'll see the output you want.

Have a look at the async library. If you need a response after the process is finished, use an async-series or async-waterfall.