place all the code from the first !file_exists() to this one, its the same