Fixed save document and tested with selenium