function script test, stacktrace logging

addresses issue #31 and #17