gsubing [] at extract_basename