added exceptions and separated objects from json dumps