switched daemon() and system() to fork(), improved timing