Fix the wrongfully used value in output dir parameter

Intend to Fix issue #281