change to allow file SEXP return values
add regression tests for SEXP return values