Made deployment more robust and timeout when it fails as to not keep a thread busy