Added check function for the demons.
Updated error handling.