spoj script updated with error message