Coding style improvements

Signed-off-by: Chanaka Indrajith <pe.chanaka.ck@gmail.com>
Write sahana.conf file if only the db import is success

Signed-off-by: Chanaka Indrajith <pe.chanaka.ck@gmail.com>