add a few more error check on vtam input and correctly handle allocation failure