Periodically takes a screenshot