Added a timeout in the responseStatusCode function