Bug fix for single file plus some logging refinement