Better error logging and removing conditions if doesn't exist