Updated logger to run in background