add safe-read function to prevent arbitrary code execution