fix typo
clean code
use path.Base instead of parsing string