I think this question is related to another one, at least in the broad strokes. In that vein, I will refer you to my answer to that question.
But your question doesn't seem to be as focused on following the plot of a pre-existing piece as it is on letting the players take on those roles. Which, if I am interpreting you correctly, makes this a very different question.
I think if you're willing to run things that way, this can be fine. I think that the "I wish I were Luke/Conan/Logan/Bond/Whatever" urge is a primary drive for a lot of people who get into RPGs in the first place. It's certainly an important factor in any licensed game, right? So, since I know precisely enough about The X-Files to spell it, I'm not going to give you any advice on how to make that game work in particular. Instead, I'll try to give you some hints on what to avoid:
Destinies - Basically, this means that the players know their characters have "destinies" because the character did something in the canonical work. You've got to eliminate this. If a player gets himself killed being stupid, you can't have him saying, "I can't die now, I haven't blown up the Death Star yet!" This is a very powerful form of Script Immunity and it can make playing frustrating instead of fun. See my answer linked above for more information on how I've dealt with this.
Precognition - This is like a destiny for the world. When players know what's going to happen, they leverage it like crazy. It's like Biff and his sports almanac. Imagine if there were bookmakers in Middle-Earth. What would the odds on the good guys winning at Helm's Deep have been? Any savvy PC could make a fortune on that, right?
Encyclopedic Knowledge - Some fictional worlds are fantastically well-developed, and many fans know far more about those worlds than characters within them should. Imagine that Harry Potter walks into Professor Quirrell's office on his first day at Hogwarts and beats him to death. The player says, "OK, let's get going on that whole horcrux thing right now, and forget about quidditch, huh?" It's exactly the correct thing to do, but how could Harry's player have known?
The solution to this is simple: Tell the players, "Abandon what you think you know."
Of course, this takes away your reassuring security blanket as a GM. You have to be willing to abandon what you think you know, too. You have to be willing to let the players make changes to the canonical world of whatever scope they are capable.
After all, if they can't make things come out differently, if they can't change the story, then why are they playing? You should be reading, or watching, or whatever, instead.
As for what to do if the player makes the character act "out of character", my answer is nothing. Once you allow that character as a PC, you are putting that character's actions in the hands of your player. And like I said before, both of you have to abandon what you think you know.
You think you know what Yoda or James Bond or Harry Potter will do in a given situation. But you've already given responsibility for those decisions to a player. Like I said, if the player can't change the story, why are you bothering?
And more than that, in the social compact of RPGs, the PCs actions are the purview of the player, not the GM. A deal was made, implicitly or explicitly. The player said, one way or another, "I want to take over this well-known character and make his choices for him." You said, "OK. Go ahead." You can't go back on the deal now just because you don't like the choices.
What you can do is react within the fiction. In the Harry Potter example above, what happens to Harry next? A trip to Azkaban, I'll bet! That's what they do with murderers! So while you can't prevent an out-of-character action, you can react to one in a way that is consistent with the fiction you're creating. Even if Harry gets imprisoned, there's still a lot of room for roleplaying adventure here! He gets a trial right? People escape from Azkaban, right? Can he convince Ron and Hermione that he was forced to do what he did? What happens to wizarding society if "Voldemort was on his head, so I had to kill him!" becomes a valid defense?
If you're going to let a player take an existing character, you've got to let him take it. You can't put him on a track and never let him deviate. You've got to roll with the changes wrought by the player - and existing characters are frequently powerful people in critical positions, able to make vast, sweeping changes to their worlds. That's what makes them interesting in the first place! But the player has to accept the consequences of his out-of-character actions - after all, he's the one who wanted to shake things up!