Refactored. Added error handling if no trashes stored to json