Process logfiles and conditionally perform certain actions