added if file_exists on thumbnail