Added possibility to read file and not rely on user input