Allow using custom function for local file access.