Made error message more dynamic