Fix error display for deployment and improve security with local path and ftp