test writing files