check on filecontent.length in read and write methods. Fixes #4 Added image by url.