unpackData members set to NULL after freeing edv
Close key file after filling unformatted