Error -99 when capturing image