Implement attaching files functionality 

Issue #651