added convenience constructor with File