added status writing to file for ex 1