Improved error handling for DB issues, changes in scripts using pbeast