Fixed yet another problem (HS_WRITE_FUNCTION still set to stdout) with logging.