Fixes for error throwing and app-path