Fixes an issue with how mode is detected for SFF file streams

Closes #440