added error handling for all bulk ruby scripts