Reconstruct directory structure and add data encryption/decryption