Removed tail function, improved script command-line usage