Use separate opts object for each file

This seems to fix #134