added block error checks and messages