chown() on logfile after setuid() too late