Use different opts object per file

This seems to fix #134