Change the way docs are loaded when key file is given