Added printing option
Changed to json instead of pickle