fixed openlog()