check ownership of logfile before using it