use file to avoid blocking