some error checking and message updates