updating run loop for better error handling