patched to allow file reads from system