Updated logging and printing formatting. Added some more checks for data quality.