Bug fixes and file picker code