1. Made changes to papers.py to handle missing and invalid json files.
2. Added test cases to handle missing and invalid json files.