simplify makedir
refactor print statement
with statement