Running a basic monitoring loop