Added automatic writing of md5 attribute. Removed 'tmp' from head of the default md5 attribute name