Replaced the bash script by a try/except block in generate_collections.py; added success or failure message on updating the database.