Add a resolve method to deal with relative paths.
Make better use of alerts.