use basename and not gsub