Added support for non-image files