added error handling for unknown image paths