removed useless printStackTrace function
improved iOS support