reverted back to file-only checks, changed to file_exists()