minor bug fix on ec2instance to create output directory