Log the error if the daemon crashes
Remove trailing whitespace