Changed to use try/catch instead of erlang:function_exported since it is more reliable