Fixed spelling of requirements.txt and moved closing the db connection into main function