need to catch exceptions here also, or perhaps just catch it higher up in checkForLogs.