removing session stuff thats unneeded and breaking.
Fixing file_exists check.