Kshitij,
Did you give ReadWrite access to the Name and Contents attibutes of your document?
Don't use System.FileDocument directly, but a specialization of System.FileDocument. That way, you can set security on the attributes as you can't set security to System.FileDocument.