fixed file download check function