Avoid using separate files and trying to use them directly bypassing the web application, this will create many unexpected problems and cannot be carried to future versions which usually have changes. You may want to read Using Route_Action server event (v2021). If you prefer custom file, you may add your own controller.