Feature/fix base dir

base_dir() had bug. I fixed it and use it in run() subroutine.