taking file as input