using mkdir -p instead of if not exists
bug fix