Create the state path before attempting to write a file in that path