read meta data when opening file