check for single function export & err handling