Added support for multipart file

- Also optimized the creation of command pipeline

fixes #70 again!