Don't centralise your king too early!
In life, timing is everything.
As in chess, the timing of when to centralise your king is important. In general, if major pieces are still on the board (rooks and queens) it's better to have your king tucked safely away in some corner.
The following game (I hope) illustrates this: