Add background logging
Fix #14, Version 3.13