add more verbose stuff and minor change of read function