Fixed logic for identifying new images during periodic check. Also fixed a bug where brain was not updated correctly during check.