trailing space , exception as added and die function changed with log