modified train.sh to allow loggin