Better error handling of missing parameters