File end added

TODO; Fix mysql bug