Added check for file resource