added debug statments for the possible reasons why the read may fail