Fixed Command handler. And added command for creating document and for attaching document