fix usage of logger before it is initialized (fix #490)