Testing for nil moved outside on keypath logging.

Testing inside the File constructor *apparently* worked but it's extremely fragile.