Catch error when loading db file