Use ast_safe_system() in logger.c instead of system()