Logging, better process handling