make error message more clear
output error if one happens