Update loader.cpp

sorts database into a text file to be sent to our database