added getResolution and fixed bug with empty files