Added helper function for parsing from a file directly