Added error messaging