Fixed a bug that doesn't work with route and engine directories doesn't exist