Bug fix: logger files are closed and removed from logging object