Add option cover_write_enabled

* Write coverage result to coverage log file
* Break out print_coverage functionality to helper functions