Fixed log file spam with mock object, added to relevant test