Added support for error callbacks

Added support to pass an error callback to be called if the page specified does not exist.