Added pid_file verification to daemonize
Daemonization is done after configuration

Thus logging is initialized before anything is done
Wrapped all initialization in try/catch