added support of external file