Better dynamic function calls error handling