[#94] fix default use of filename in middleware and allow `out` option
[#94] fix default use of filename in middleware and allow `out` option

tmm1/stackprof,tmm1/stackprof,tmm1/stackprof,tmm1/stackprof