Don't use fopen, use File read() to avoid leaving FDs open