improved unit testing coverage of files handlers