If thing change with the gas cap off but it still dies then I agree with matt5112. Monitor fuel pressure under idle conditions. If the system pressure maintains >45 psi then move on. The problem is probably the MAF, IAC or a vacuum leak.