added error checking and set graphics to hi-def