Constructor directly from file