Added file input functions