Decouple logging and daemonization