adding logging
checking size of metadata