better PIL and debugging