option to open file in different read modes