catching errors better
added support for local file uploads amd imporved error handling and logging when an invalid protocol is specified