Fix copyOnly function - currently nothing gets marked copyOnly

This copyOnly test should have been done on mid, not filename. 

If you use filename, the regex does not match correctly, as the filename never starts with "app"