Removed 1000 limit and added error-checking/not exiting on error