Split write to update and create
mode exception
cleanup after tests and make the type a directory instead of a part of the file name