Fixed out_file when is provided
Merge branch 'enh/NewMiscTools' into unstable