Fixup extractFilename and add log message for debugging.