Changed to md5 for temp file name, and added logging. Also added 'external' to config options.