Issue 361 - patterns.ini cleared when writing to file got interrupted