Added a 404 error for invalid directory access in API_Server