Improved error checking
Added ability to rename a file
Auto-load SQL library
Renamed catalog table
Misc cleanups