move defer after error check
More tests for Subtitle type