timeout error handling

Added Error Handling