using file instead of string