added fromfile, removed max_output