url args support added
redirect added
flush logic and errors handle added