public function getFileStream($file, $mode = "w+")
    {

        //Throw some errors
        if (($handle = fopen($file, $mode)) == false) { //this fopen with w will attempt to create the file

            //@Throw error
            return false;
        }

        return $handle;
    }