improved "logging"