Fix create thumbnail exception to be thrown if no media is found