Added support for opened file as argument of parse