Replaced custom file function with Hoek.