synchronize all methods so only one can occur simultaneously, avoids clashes on creating/deleting files.