Added error print out