Added code for saving attachment. But not finished yet.