Implements log output option