Adds stubbing of file writing in spec files