Added threading and a not found error message