robustified python script and added summary in the end