Added logging statements to the entry log outside the fork so that a log rotate can happen.