Modifying sfs_code to accept input from files