made option for different file types (png, pdf, etc.)