modified deploy to work with paths and added error handling