allowed path param to be URI or file
added more exception reporting