added function syncSfIO to SF
added function runS to SF
added helper functions for dealing with input validation