Fixed logging code in autoFork