made file argument optional