Modifying dictionary loader to handle both pickle and json