Better handling of ~/.tk file