task error handling and replacing popen with fabric