fixed bug in case of local file usage