Improve eval_file function

Fixes #10