Cleaning up based on CR feedback. Adding timeout interval and exception handling