creating dir and file - image not viewable