fixed alignment issue -output to file not stdout