Optimize checking logic for API:file