[#1880] Use commons-io API to avoid re-inventing the wheel -  fixed compilation error