Add convenience function that parses a file.