added "--pretty" option for better debugging