Added debug logging of the detected subdirectory