one more abstraction for dir
dump the process to the specified dir